#define  _CRT_SECURE_NO_WARNINGS 1

#include "List.h"

void ListText()
{
	ListNode* phead = NULL;
	phead = ListInit();
	ListPushBack(phead,1);
	ListPushBack(phead,2);
	ListPushBack(phead,3);
	ListPrint(phead);
	ListPopBack(phead);
	ListPrint(phead);
	ListPushFront(phead, 99);
	ListPrint(phead);
	ListPopFront(phead);
	ListPrint(phead);
}

void ListText1()
{
	ListNode* phead = ListInit();
	ListPushBack(phead, 1);
	ListPushBack(phead, 2);
	ListPushBack(phead, 3);
	ListPushBack(phead, 4);
	ListPushBack(phead, 5);

	ListNode* pos = ListFind(phead, 3);
	ListInsert(pos, 99);
	ListErase(pos);
	ListPrint(phead);

	ListDestory(&phead);
}
int main()
{
	//ListText();
	ListText1();

	return 0;
}